package com.lxitedu.chain.processor;

import com.lxitedu.utils.Context;
import com.lxitedu.utils.LxitException;

public class CreateTableChain extends Chain {

  @Override
  public void process(Context context) throws LxitException {
    Object tableName = context.getValueMap().get("tableName");
    if(tableName==null){
      throw new LxitException("Please give a tableName first!");
    }
    context.getEmailDataDao().createTable((String)tableName);
    processNext(context);
  }

}
